<html>
<title>runMultiTCW</title>
<body style="padding:20px;width:650px;font-family:Times">
<h2>Build a multiTCW database (runMultiTCW)</h2>

The multiTCW manager allows you to build a new multiTCW database, modify an existing one,
and perform clustering of transcripts. Note that a multiTCW database is built by combining 
one or more existing singleTCW databases, which must already have been created and 
(optionally) annotated. 

<ol>
<li><a href=#add>Add/Select project</a> - create new project or modify existing
<li><a href=#step1>Build Database</a> - from one or more singleTCW
<li><a href=#step2>Blast</a> - run self blast on file generated in step1
<li><a href=#step3>Cluster</a> - add/remove clusters at anytime after steps 1-3
</ol>

<a name=add>
<h3>Add/select project</h3>

<b>Add Project:</b> This will request a project name. As soon as you choose the name, the manager
begins to store the project configuration information in a file. If you exit the manager and return,
the partially-completed project will now be available through "Select Project". 
<p>
<b>Project Select:</b> Browse for existing projects, which are listed under
the /projcmp directory. These may be either fully-loaded projects
that are already in a MySQL database, or projects which were previously partially completed, but not
yet finalized and loaded (using the Build Database button). 
<p>
<b>DB Name/Host:</b> TCW can work with databases on multiple different host machines, which are
listed in HOSTS.cfg. When you create a new project, you need to select one of these hosts as the destination.
You can also edit the database name, but do not remove the "mTCW_" prefix. 
<p>
<b>Remove:</b> You can remove the mTCW project either from the MySQL database, the disk, or both.
(If you remove it only from the database, you can easily reload it later from the disk.)
<a name=step1>
<h3>Build database</h3>

Here you define the mTCW project by adding sTCW databases, using the "Add" button. This brings up a
new window, which has its own Help.
<p>
When you are finished adding sTCW databases, press "Build Database". This gathers all the individual
sTCW data and collects it into an mTCW database on the MySQL host. Progress reports will print to the
terminal window, and the loading usually takes 10-30 minutes. If you have to cancel it
with Cntl-C, then delete the MySQL database
next time you run the manager, and rerun "Build Database".

<a name=step2>
<h3>Blast</h3>
To cluster the transcripts you need to first run a Blast alignment of the transcript set. 
Use the "Settings" button to set the Blast parameters (this opens a new window which has further Help). 
<p>
Press "Run Blast" to run the Blast. Note that "Run Blast" is inactive if the option "Use Blast File"
is selected on the Settings window (and the specified Blast file exists).  



<a name=step3>
<h3>Cluster</h3>

To create transcript clusters (e.g., putative ortholog sets), press "Add" to add a new
cluster method to the table. Then press "Add New Clusters" to run the calculations for each
new method and store the clusters to the database. (Note, if you add more than one
new method to the table, "Add New Clusters" runs them all.)
<p>Cluster sets that have been created and added to the database are listed in <i>italics</i>. 
You can add new clusters or remove existing clusters.
<p>Once clusters are created for a method, the Pearson Correlation Coefficient is computed
for sequences that share one or more libraries. If the clusters are very big, this is VERY 
time-consuming (i.e it could take days). 
If there are really big clusters, the parameters were 
probably not tight enought; you can cntl-C to stop the process, restart runMultiTCW and remove
the cluster method and add a new one with tighter parameters. Alternatively, you may have
too many near duplicas in your dataset.

</html>